-- GENERATED SPELL FOR [Twilight's Hammer Ambassador] --


function spell0_8915(pUnit, Event) --@Amplify Damage,n/a--
pUnit:FullCastSpellOnTarget(12248,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_8915', 12000, 1)
end

function spell1_8915(pUnit, Event) --@Bloodlust,n/a--
pUnit:FullCastSpellOnTarget(6742,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_8915', 30347, 1)
end

function spell2_8915(pUnit, Event) --@Curse of Weakness,n/a--
pUnit:FullCastSpellOnTarget(11980,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_8915', 529, 1)
end

function spell3_8915(pUnit, Event) --@Earth Shock,n/a--
pUnit:FullCastSpellOnTarget(15501,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_8915', 2306, 1)
end

function spell4_8915(pUnit, Event) --@Flame Shock,n/a--
pUnit:FullCastSpellOnTarget(15096,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_8915', 12000, 1)
end

function spell5_8915(pUnit, Event) --@Frost Armor,Self--
pUnit:FullCastSpellOnTarget(12544,pUnit)
pUnit:RegisterEvent('Sorts_8915', 0, 1)
end

function spell6_8915(pUnit, Event) --@Frost Shock,n/a--
pUnit:FullCastSpellOnTarget(15499,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_8915', 8350, 1)
end

function spell7_8915(pUnit, Event) --@Shock,n/a--
pUnit:FullCastSpellOnTarget(15500,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_8915', 0, 1)
end

function Sorts_8915(pUnit, Event)
local choix_sorts_8915 = math.random(0, 7)
if choix_sorts_8915 == 0 then
pUnit:RegisterEvent('spell0_8915', 1, 1)
end
if choix_sorts_8915 == 1 then
pUnit:RegisterEvent('spell1_8915', 1, 1)
end
if choix_sorts_8915 == 2 then
pUnit:RegisterEvent('spell2_8915', 1, 1)
end
if choix_sorts_8915 == 3 then
pUnit:RegisterEvent('spell3_8915', 1, 1)
end
if choix_sorts_8915 == 4 then
pUnit:RegisterEvent('spell4_8915', 1, 1)
end
if choix_sorts_8915 == 5 then
pUnit:RegisterEvent('spell5_8915', 1, 1)
end
if choix_sorts_8915 == 6 then
pUnit:RegisterEvent('spell6_8915', 1, 1)
end
if choix_sorts_8915 == 7 then
pUnit:RegisterEvent('spell7_8915', 1, 1)
end
end

function mob8915_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_8915', math.random(1500, 3000), 1)
end

function mob8915_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob8915_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob8915_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(8915, 1, 'mob8915_Action')
RegisterUnitEvent(8915, 2, 'mob8915_Leave')
RegisterUnitEvent(8915, 3, 'mob8915_Kill')
RegisterUnitEvent(8915, 4, 'mob8915_Die')
